home *** CD-ROM | disk | FTP | other *** search
/ New Star Software Collection / NSS_Collection.iso / 3-170 dbase 10 for windows / 1.ima / SAMPLES.PAK / CONTACT.PRG < prev    next >
Text File  |  1993-07-26  |  2KB  |  74 lines

  1. *******************************************************************************
  2. *  PROGRAM:      Contact.prg
  3. *
  4. *  WRITTEN BY:   Borland Late Night Crew
  5. *
  6. *  DATE:         5/93
  7. *
  8. *  UPDATED:      7/93
  9. *
  10. *  VERSION:      Alpha α
  11. *
  12. *  DESCRIPTION:  This program relates three databases, and defines a window
  13. *                with objects from different databases that change to
  14. *                reflect changes to the record pointer in the parent database
  15. *                of the relations.  A listbox is defined showing a company
  16. *                names, a radiobutton shows the type of company, and an
  17. *                editor object shows any notes that were made about the
  18. *                company.  Two pushbuttons are also defined.  The "Browse"
  19. *                pushbutton brings up a window with a browse object of the
  20. *                parent database, company.  The "Graph" pushbutton brings
  21. *                up a graph based on summarized information about the currently
  22. *                highlighted company name.
  23. *
  24. *  PARAMETERS:   None
  25. *
  26. *  CALLS:        None
  27. *
  28. *  USAGE:        DO Contact
  29. *
  30. *******************************************************************************
  31. * contact.prg
  32.  
  33. set talk off
  34. set procedure to sampproc
  35.  
  36. clear
  37.  
  38. use company in select()
  39. use summary in select() order compcode
  40. use contact in select() order compcode
  41. select company
  42. set relation to compcode into contact, compcode into summary
  43.  
  44.  
  45. define window Comp304 from  2, 2 to 20,70 ;
  46.    of application;
  47.    title "Contact";
  48.    sizeable;
  49.    onclose Contact_Clean()  && Close all open files when the window is closed
  50.  
  51. define listbox Listbox1 of Comp304 from  2, 4 to 10,28 ;
  52.    prompt field Company->company
  53. define radiobuttons Company->type of Comp304 at 11,12 ;
  54.    prompt "OEM" pick "O",  ;
  55.    "ISV" pick "I",  ;
  56.    "VAR" pick "V" ;
  57.    vertical
  58. define editor Editor1 of Comp304 from  1,32 to 12,64 ;
  59.    memo Contact->notes
  60.  
  61. define pushbutton   Pushsummar of Comp304 at 14,25 ;
  62.    prompt "Summary" pick "S"
  63. define pushbutton   Pushgraph  of Comp304 at 14,nextcol();
  64.    prompt " Graph " pick "G"
  65. * BUG -- problems closing a window after closing databases
  66. *define pushbutton   Pushcancel of Comp304 at 14,nextcol();
  67. *    prompt "Cancel " pick "C"
  68.  
  69. on selection window Comp304 do Selectcomp
  70.  
  71. open window Comp304
  72. set focus to Comp304
  73. ****************************** End of Contact.prg *****************************
  74.